﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace uffChat.Models
{
    public class ChatMsg
    {
        public string Nick { get; set; }
        public string Message { get; set; }
        public DateTime Time { get; set; }

        public ChatMsg(string _nick, string _message, DateTime _time)
        {
            Nick = _nick;
            Message = _message;
            Time = _time;
        }

        public override string ToString()
        {
            string _message = this.Message.ToString();
            string _nick = this.Nick.ToString();
            string _time = this.Time.ToShortTimeString();
            return String.Format("{0};{1};{2}\n",_time,_nick.Remove(_nick.Length - 2),_message);
        }
    }
}